package cn.iocoder.yudao.module.digital.service.cardchannel;

import cn.iocoder.yudao.module.digital.dal.dataobject.cardkeyorder.CardkeyOrderDO;
import cn.iocoder.yudao.module.digital.enums.cardkeysecret.CardKeySourceEnum;
import cn.iocoder.yudao.module.digital.service.cardchannel.model.common.CdkGenCardReq;
import cn.iocoder.yudao.module.digital.service.cardchannel.model.common.CdkGenCardResult;
import cn.iocoder.yudao.module.digital.service.cardchannel.model.common.CdkProduct;

import java.util.List;

public interface ICardChannelManager {

    ICardChannel getChannelImpl(CardKeySourceEnum source);

    List<CdkProduct> getAllProducts(CardKeySourceEnum source);

    CdkGenCardResult onlyQueryOrderResult(CardkeyOrderDO cardKeyOrder);

    CdkGenCardResult queryOrderResult(String cardOrderId);

    // 创建单商品多数量订单
    CdkGenCardResult createMultipleQuantitiesOrder(CardKeySourceEnum source, CdkGenCardReq req);

    // 创建单商品单数量订单
    CdkGenCardResult createSingleQuantitiesOrder(CardKeySourceEnum source, CdkGenCardReq req);

    // 创建卡密聚合订单
    CdkGenCardResult createAggregatedOrder(CardKeySourceEnum source, CdkGenCardReq req);

    void updateCardKeyOrder(CardkeyOrderDO cardKeyOrder, CdkGenCardResult res);

}
